﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
namespace GenerateKeys
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Friendly Fire Installer");
            Console.WriteLine("----------------------------------------------");
            Console.WriteLine("- Please wait while your encryption keys are generated.");
            Console.WriteLine("- This can take up to several minutes on slower processors.");

            FriendlyFire.DBHelper dbh = new FriendlyFire.DBHelper();

            using (RSACryptoServiceProvider myKey = new RSACryptoServiceProvider(4096))
            {
                dbh.SetConfig("personalkey", myKey.ToXmlString(false));
                dbh.SetConfig("privatekey", myKey.ToXmlString(true));
                myKey.Clear();
            }
            Console.WriteLine("- Key generation completed.");
            Console.WriteLine("- You may now launch Friendly Fire from your desktop.");
        }
    }
}
